﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace Hip.Define_Test {
	public class TestModel: INotifyPropertyChanged {
		protected virtual void Changed( string propertyName ) {
			PropertyChangedEventHandler handler = PropertyChanged;
			if ( handler != null ) {
				handler( this, new PropertyChangedEventArgs( propertyName ) );
			}
		}

		private string _name;
		public string Name {
			get {
				return _name;
			}
			set {
				if ( _name != value ) {
					_name = value;
					Changed( "Name" );
				}
			}
		}
		private string _address;
		public string Address {
			get {
				return _address;
			}
			set {
				if ( _address != value ) {
					_address = value;
					Changed( "Address" );
				}
			}
		}
		//private string _status;
		//public string Status {
		//   get {
		//      return _status;
		//   }
		//   set {
		//      if ( _status != value ) {
		//         _status = value;
		//         Changed( "Status" );
		//      }
		//   }
		//}
		private bool _awesome;
		public bool Awesome {
			get {
				return _awesome;
			}
			set {
				if ( _awesome != value ) {
					_awesome = value;
					Changed( "Awesome" );
				}
			}
		}

		public event PropertyChangedEventHandler PropertyChanged;
	}
}
